package com.zhiyou100.crm.service.impl;

import com.zhiyou100.crm.dao.NoticeDao;
import com.zhiyou100.crm.dao.impl.NoticeDaoImpl;
import com.zhiyou100.crm.service.NoticeService;
import com.zhiyou100.crm.util.Notice;
import com.zhiyou100.crm.util.User;

import java.util.List;

public class NoticeServiceImpl implements NoticeService {
    private NoticeDao noticeDao=new NoticeDaoImpl();
    @Override
    public List<Notice> queryAllNotice() {
        return noticeDao.queryAllNotice();
    }

    @Override
    public Boolean removeById(int noticeId) {
        return noticeDao.removeById(noticeId);
    }
    @Override
    public Notice queryNoticeById(int notice_id) {
        return noticeDao.queryNoticeById(notice_id);
    }

    @Override
    public List<Notice> queryNoticeByFile(String field) {
        return noticeDao.queryNoticeByFile(field);
    }

    @Override
    public int addNotice(Notice notice, User user) {
        return noticeDao.addNotice(notice,user);
    }

    @Override
    public int upadteNotice(Notice notice,int id) {
        return noticeDao.upadteNotice(notice,id);
    }
}
